﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using TSV.Areas.Administration.Models;
using TSV.Models;

namespace TSV.Controllers
{
    public class ArticleViewController : BaseViewController
    {
        #region Variables
        private ArticleDao articleDao = new ArticleDao();
        #endregion

        public ActionResult Index(string alias)
        {
           // ViewData["alias"] = alias;
            Article obj = articleDao.GetArticleByAllias(alias);
            if (obj != null)
            {
                return View(obj);
            }
            else
            {
                return RedirectToAction("Index", "Home");
            }
        }  
      
    }
}
